<template>
  <el-card :bordered="false" class="addOrder">
    <el-page-header @back="$router.go(-1)" style="margin-bottom:10px"></el-page-header>
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      :labelWidth="labelWidth"
      class="demo-ruleForm"
    >
      <!-- 基本信息 -->
      <com-title :styleIng="{margin:'10px 0px 10px 10px'}" :isShow="false">
        <span slot="title">基本信息</span>
        <el-row :gutter="10" slot="table">
          <!-- <el-col :xs="8">
            <el-form-item label="供应商：" prop="gysmc">
              <el-select
                v-model="ruleForm.gysmc"
                placeholder="请选择供应商"
                filterable
                :disabled="disabled"
                style="width:100%"
              >
                <el-option
                  :value="item.value"
                  v-for="(item,index) in gysmc"
                  :key="index"
                  :label="item.label"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col> -->
          <el-col :xs="8">
            <el-form-item label="配送日期：" prop="date1">
              <el-date-picker
                v-model="ruleForm.date1"
                type="date"
                placeholder="选择日期"
                style="width:30%"
                value-format="yyyy-MM-DD"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :xs="8">
            <el-form-item label="备注：">
              <el-input
                v-model="ruleForm.spmc"
                placeholder="请填写备注"
                type="textarea"
                style="width:30%"
                :disabled="disabled"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </com-title>

      <!-- 采购信息 -->
      <com-title :styleIng="{margin:'10px 0px 10px 10px'}" :isShow="false">
        <span slot="title">
          <span>采购信息</span>
          <!-- <el-button
            type="primary"
            style="margin-left:10px;position: relative;top: -3px;"
            v-if="ruleForm.lx == 2"
            @click="addStore"
          >添加直送门店</el-button> -->
        </span>
        <buyingIfor  slot="table" ref="buyingIfor" style="margin:10px 0px 10px 10px" />
      </com-title>
      <div class="content">
        <el-button type="primary" @click="submitSave('ruleForm')">提交采购单</el-button>
        <el-button @click="quxiao('ruleForm')">取消</el-button>
      </div>
    </el-form>
    <choiceShop ref="choiceShop"  @trigger="trigger" />
  </el-card>
</template>

<script src='./index.js'></script>

<style lang="scss">
.addOrder {
  .content {
    text-align: center;
    margin: 20px 0px;
    button {
      margin-right: 10px;
    }
  }
}
</style>
